package com.hjx.windowtool.bk.dibaqu.server;


import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@Entity
@ToString
public class BookInfo extends DomainObject {
	private String title;
	@Column(length=5120)
	private String detail;
	private String author;
	private int chapterCount;
	private String url;
	private String lastchapter;
	@Temporal(TemporalType.DATE)
	private Date lastUpdate;
	private String fullflag;
	
	@OneToMany(cascade=CascadeType.REMOVE,mappedBy="book")
	private List<BookChapter> chapters=new ArrayList<>();
}
